package com.js.lib_common.http;


import com.js.lib_common.mvp.model.CommonBean;
import com.js.lib_common.mvp.model.response.LoginResponse;
import com.js.lib_common.mvp.model.response.MissionResponse;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Query;


public interface ApiStores {





    String BASE = "/gas-service/";


    /**
     * 登录
     */
    @Multipart
    @POST("security-service/oauth/token")
    @Headers("Authorization: Basic dXNlci1zZXJ2aWNlOjEyMzQ1Ng==")
    Observable<LoginResponse> login(@PartMap Map<String, RequestBody> requestBodyMap);


    /**
     * 涮新token
     */
    @Multipart
    @POST("security-service/oauth/token")
    @Headers("Authorization: Basic dXNlci1zZXJ2aWNlOjEyMzQ1Ng==")
    Call<LoginResponse> refreshToken(@PartMap Map<String, RequestBody> requestBodyMap);









    /**
     * 控制中心-工单列表
     *
     * @param currentPage 当前页码
     * @param pageSize    每页显示条数
     * @param orderStatus 维修工用户ID,根据该id查询分配给自己的工单
     *                    <p>
     *                    1已派单，0未派单；
     *                    3已就位，2未就位；
     *                    31已关阀，3未关阀；
     *                    41已降压，3未降压；
     *                    33已开阀，32未开阀；
     * @return
     */
    @GET(BASE + "msaRepairOrder/listpageForApp")
    Observable<CommonBean<List<MissionResponse>>>
    getMissionList(@Query(value = "currentPage", encoded = true) int currentPage,
                   @Query(value = "pageSize", encoded = true) int pageSize,
                   @Query(value = "orderStatus", encoded = true) String orderStatus);
















}
